//package com.fecean.aabbc.netty.client.prod1;
//
//import io.netty.channel.ChannelInitializer;
//import io.netty.channel.socket.SocketChannel;
//import io.netty.handler.codec.string.StringDecoder;
//import io.netty.handler.codec.string.StringEncoder;
//import io.netty.handler.timeout.IdleStateHandler;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.Resource;
//import java.util.concurrent.TimeUnit;
//
///**
// * NettyClientInitializer
// *
// * @author: chenfenghai
// * @version: 1.0
// * @date: 2020-02-24 10:13
// * @blame Team
// */
//@Component
//public class NettyClientSocketChannelInitializer extends ChannelInitializer<SocketChannel> {
//
//    @Resource
//    NettyClientRegisterHandler nettyClientRegisterHandler;
//
//    @Resource
//    NettyClientHeartBeatClientHandler nettyClientHeartBeatClientHandler;
//
//    @Resource
//    NettyClientBusinessHandler nettyClientBusinessHandler;
//
//    @Override
//    protected void initChannel(SocketChannel socketChannel) throws Exception {
//        socketChannel.pipeline().addLast(new IdleStateHandler(0L, 10L, 0L, TimeUnit.SECONDS));
//        socketChannel.pipeline().addLast(new StringDecoder());
//        socketChannel.pipeline().addLast(new StringEncoder());
//        socketChannel.pipeline().addLast(nettyClientRegisterHandler);
//        socketChannel.pipeline().addLast(nettyClientHeartBeatClientHandler);
//        socketChannel.pipeline().addLast(nettyClientBusinessHandler);
//    }
//}
